package com.ymatou.iapi.productitem.service;

import org.json.JSONObject;

import com.ymt.base.YmatouBaseCall;
import com.ymttest.utils.EnvSetup;


public class GetProductInfoByCatalogIdCall extends YmatouBaseCall{
	private static String opurl ="/api/Product/GetProductInfoByCatalogId";
	
	public GetProductInfoByCatalogIdCall() {
		super(EnvSetup.getSystemUrl("productitem"),opurl,"GET","PARAMETER");
	}
	@Override
	public void addDefHeader() {
		client.addHeader("Accept","text/xml,text/javascript,text/html,application/json");
		client.addHeader("Content-Type", "application/json; charset=UTF-8");
	}
	

	public static JSONObject GetProductInfoByCatalogId(String CatalogId) throws Exception{
		GetProductInfoByCatalogIdCall getProductInfoByCatalogIdCall=new GetProductInfoByCatalogIdCall();
		getProductInfoByCatalogIdCall.setData("CatalogId=" + CatalogId);
		getProductInfoByCatalogIdCall.callService();
		return  new JSONObject(getProductInfoByCatalogIdCall.getReturnData()) ;
	}
	

}
